﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace CloudMusic.Converters
{
    public class LikesToTipsConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string strKey = "";
            switch ((int)value)
            {
                case 0:
                    strKey = "喜欢";
                    break;
                case 1:
                    strKey = "取消喜欢";
                    break;
            }
            return strKey;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value != null && value.Equals(true) ? parameter : Binding.DoNothing;
        }
    }
}
